package com.example.demo.dao;

import com.example.demo.entity.GoodsCategory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface GoodsCategoryDao {

    GoodsCategory getById(Integer id);

    List<GoodsCategory> listByEntity(GoodsCategory goodsCategory);

    GoodsCategory getByEntity(GoodsCategory goodsCategory);

    List<GoodsCategory> listByIds(List<Integer> list);

    int insert(GoodsCategory goodsCategory);

    int insertBatch(List<GoodsCategory> list);

    int update(GoodsCategory goodsCategory);

    int updateByField(@Param("where") GoodsCategory where, @Param("set") GoodsCategory set);

    int updateBatch(List<GoodsCategory> list);

    int deleteById(Integer id);

    int deleteByEntity(GoodsCategory goodsCategory);

    int deleteByIds(List<Integer> list);

    int countAll();

    int countByEntity(GoodsCategory goodsCategory);

}
